Web_Login
The Web_Login API enables to transfer the details of Legal Representative user who logs in the ledger to Analytics.
Method: POST
{{localCEUrl}}/analytics/rest/eventApi/event
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
Parameter | Description |
---|---|
InstructionIdentification Mandatory | String Unique identifier of the payment instruction Example – "f9a820da-7bcd-4941-b85c-201169ccf41a" |
EndToEndIdentification Optional | String Unique identifier to track the transaction any time during the process Example – "31fe4401-d804-441e-b67a-44016b99b08f" |
Channel Optional | String Channel through which the transaction happens Example – "SYSTEM" |
TransactionType Optional | String Type of non-financial event Example – "LOGIN" |
TransactionCode Optional | String Specific code for the transaction type Example – "WEB_LOGIN" |
TransactionDateTime Optional | String Date and time of the non-financial event happens Example – "1568204557881" |
Source Optional | String Name of the source system where the event happens Example – "LEDGER" |
TransactionAmount Mandatory | Object |
Amount Mandatory | String For non-financial event, the amount is ‘0.00' always Example – "0.00" |
Currency Mandatory | String Currency type is ‘USD' by default Example – "USD" |
MachineFingerPrint Optional | Object |
IpAddress Optional | String IP address of the device where the event happens Example – "192.168.0.1" |
MacAddress Optional | String Unique identifier assigned to a network interface controller Example – "00-00-00-00-00-00-00" |
OperatingSystem Optional | String Operating system of the device Example – "Mac OS" |
WebBrowser Optional | String Web browser used for the event happens Example – "Chrome" |
SessionId Optional | String Unique identifier that a web server assigns to a user for the duration of the current session Example – "D6535298F1DC3AE920B643A6B60D4C25" |
Customer Mandatory | Object |
Identification Mandatory | String Individual ID of the customer Example – "569553515904658" |
Name Mandatory | String Customer name of the customer Example – "Thomas V Godfrey" |
AccountNumber Mandatory | String Account number of the customer Example – "200502391928095" |
GeoLocation Optional | |
Latitude Optional | String Geographical latitude of the location where the transaction occurred Example – "" |
Longitude Optional | String Geographical longitude of the location where the transaction occurred Example –" |
- cURL
- C#
- Go
- NodeJs
curl --location --globoff '{{baseCEUrl}}/analytics/rest/eventApi/event' \
--header 'Content-Type: application/json' \
--data '{"InstructionIdentification":"f9a820da-7bcd-4941-b85c-201169ccf41a","EndToEndIdentification":"31fe4401-d804-441e-b67a-44016b99b08f","Channel":"SYSTEM","TranactionType":"LOGIN","TranactionCode":"WEB_LOGIN","TransactionDateTime":1568204557881,"Source":"LEDGER","TransactionAmount":{"Amount":"0.00","Currency":"USD"},"MachineFingerPrint":{"IpAddress":"192.168.0.1","MacAddress":"00-00-00-00-00-00-00","OperatingSystem":"Mac OS","WebBrowser":"Chrome","SessionId":"D6535298F1DC3AE920B643A6B60D4C25"},"Customer":{"Identification":"569553515904658","Name":"Thomas V Godfrey","AccountNumber":"200502391928095"},"GeoLocation":{"Latitude":"","Longitude":""}}'
var options = new RestClientOptions("{{baseCEUrl}}/analytics/rest/eventApi/event")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""InstructionIdentification"": ""f9a820da-7bcd-4941-b85c-201169ccf41a"",
" + "\n" +
@" ""EndToEndIdentification"": ""31fe4401-d804-441e-b67a-44016b99b08f"",
" + "\n" +
@" ""Channel"": ""SYSTEM"",
" + "\n" +
@" ""TranactionType"": ""LOGIN"",
" + "\n" +
@" ""TranactionCode"": ""WEB_LOGIN"",
" + "\n" +
@" ""TransactionDateTime"": 1568204557881,
" + "\n" +
@" ""Source"": ""LEDGER"",
" + "\n" +
@" ""TransactionAmount"": {
" + "\n" +
@" ""Amount"": ""0.00"",
" + "\n" +
@" ""Currency"": ""USD""
" + "\n" +
@" },
" + "\n" +
@" ""MachineFingerPrint"": {
" + "\n" +
@" ""IpAddress"": ""192.168.0.1"",
" + "\n" +
@" ""MacAddress"": ""00-00-00-00-00-00-00"",
" + "\n" +
@" ""OperatingSystem"": ""Mac OS"",
" + "\n" +
@" ""WebBrowser"": ""Chrome"",
" + "\n" +
@" ""SessionId"": ""D6535298F1DC3AE920B643A6B60D4C25""
" + "\n" +
@" },
" + "\n" +
@" ""Customer"": {
" + "\n" +
@" ""Identification"": ""569553515904658"",
" + "\n" +
@" ""Name"": ""Thomas V Godfrey"",
" + "\n" +
@" ""AccountNumber"": ""200502391928095""
" + "\n" +
@" },
" + "\n" +
@" ""GeoLocation"": {
" + "\n" +
@" ""Latitude"": """",
" + "\n" +
@" ""Longitude"": """"
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{baseCEUrl}}/analytics/rest/eventApi/event"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"InstructionIdentification": "f9a820da-7bcd-4941-b85c-201169ccf41a",`+"
"+`
"EndToEndIdentification": "31fe4401-d804-441e-b67a-44016b99b08f",`+"
"+`
"Channel": "SYSTEM",`+"
"+`
"TranactionType": "LOGIN",`+"
"+`
"TranactionCode": "WEB_LOGIN",`+"
"+`
"TransactionDateTime": 1568204557881,`+"
"+`
"Source": "LEDGER",`+"
"+`
"TransactionAmount": {`+"
"+`
"Amount": "0.00",`+"
"+`
"Currency": "USD"`+"
"+`
},`+"
"+`
"MachineFingerPrint": {`+"
"+`
"IpAddress": "192.168.0.1",`+"
"+`
"MacAddress": "00-00-00-00-00-00-00",`+"
"+`
"OperatingSystem": "Mac OS",`+"
"+`
"WebBrowser": "Chrome",`+"
"+`
"SessionId": "D6535298F1DC3AE920B643A6B60D4C25"`+"
"+`
},`+"
"+`
"Customer": {`+"
"+`
"Identification": "569553515904658",`+"
"+`
"Name": "Thomas V Godfrey",`+"
"+`
"AccountNumber": "200502391928095"`+"
"+`
},`+"
"+`
"GeoLocation": {`+"
"+`
"Latitude": "",`+"
"+`
"Longitude": ""`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{baseCEUrl}}',
'path': '/analytics/rest/eventApi/event',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"InstructionIdentification": "f9a820da-7bcd-4941-b85c-201169ccf41a",
"EndToEndIdentification": "31fe4401-d804-441e-b67a-44016b99b08f",
"Channel": "SYSTEM",
"TranactionType": "LOGIN",
"TranactionCode": "WEB_LOGIN",
"TransactionDateTime": 1568204557881,
"Source": "LEDGER",
"TransactionAmount": {
"Amount": "0.00",
"Currency": "USD"
},
"MachineFingerPrint": {
"IpAddress": "192.168.0.1",
"MacAddress": "00-00-00-00-00-00-00",
"OperatingSystem": "Mac OS",
"WebBrowser": "Chrome",
"SessionId": "D6535298F1DC3AE920B643A6B60D4C25"
},
"Customer": {
"Identification": "569553515904658",
"Name": "Thomas V Godfrey",
"AccountNumber": "200502391928095"
},
"GeoLocation": {
"Latitude": "",
"Longitude": ""
}
});
req.write(postData);
req.end();
Body
{
"InstructionIdentification": "f9a820da-7bcd-4941-b85c-201169ccf41a",
"EndToEndIdentification": "31fe4401-d804-441e-b67a-44016b99b08f",
"Channel": "SYSTEM",
"TranactionType": "LOGIN",
"TranactionCode": "WEB_LOGIN",
"TransactionDateTime": 1568204557881,
"Source": "LEDGER",
"TransactionAmount": {
"Amount": "0.00",
"Currency": "USD"
},
"MachineFingerPrint": {
"IpAddress": "192.168.0.1",
"MacAddress": "00-00-00-00-00-00-00",
"OperatingSystem": "Mac OS",
"WebBrowser": "Chrome",
"SessionId": "D6535298F1DC3AE920B643A6B60D4C25"
},
"Customer": {
"Identification": "569553515904658",
"Name": "Thomas V Godfrey",
"AccountNumber": "200502391928095"
},
"GeoLocation": {
"Latitude": "",
"Longitude": ""
}
}
Response: 200
Payload Parameters
Parameter | Description |
---|---|
Success | |
id | String ID of the request Example – "3d7943a8-7a34-4fe5-bf96-674a3f2ae697" |
jsonrpc | String JSON-RPC version used for the API Example – "2.0" |
method | String API method Example – "ce.event" |
result | Object |
resp | String Type of response Example – "event" |
status | String Status of the event Example – "1" |
transactionNumber | String Unique number of the non-financial event Example – "c34c16ef-82ef-40f0-89db-17c5f1b6f70c" |
riskScore | Number Estimated Risk score of the event Example – 0 |
signalScore | Number Signal reliability score of the event Example – 0 |
scenarioScore | Number Score of specific scenarios related to the event Example – 0 |
tokenScore | Number Score of token authentication used for the event Example – 0 |
categoryScore | Number Event category score of event Example – 0 |
ofacConfidentScore | Number Estimated score of compliance with OFAC regulations Example – 0 |
debtorProfileId | Null Unique ID of debtor profile Example – null |
creditorProfileId | String Unique ID of creditor profile Example – null |
error | Null Shows information, if any error occurs during transaction Example – null |
Error – A9999 | |
id | String ID of the request Example – "0529bd97-27e8-4260-96d6-d683eedd89c3" |
jsonrpc | String JSON-RPC version used for the API Example – "2.0" |
method | String API method Example – "ce.event" |
result | Object |
resp | String Type of response Example – "event" |
status | String Status of the event Example – "1" |
error | Object |
code | String Shows error code, if any error occurs during transaction Example – "A9999" |
description | String Description of the error Example – "Parsing Error" |
Error – A1008 | |
id | String ID of the request Example – "" |
jsonrpc | String JSON-RPC version used for the API Example – "2.0" |
method | String API method Example – "ce.event" |
result | Null Response result Example – null |
error | Object |
code | String Shows error code, if any error occurs during transaction Example – "A1008" Possible error codes and its description: A1001 – Credential empty A1002 – Signature empty A1003 – Payload empty A1004 – Customer empty A1005 – Amount or Currency empty A1007 – Reference empty A1008 – Duplicate reference A9999 – Parsing Error |
description | String Description of the error Example – "duplicate reference" |
//Response for Success
{
"id": "3d7943a8-7a34-4fe5-bf96-674a3f2ae697",
"jsonrpc": "2.0",
"method": "ce.event",
"result": {
"resp": "event",
"status": "1",
"transactionNumber": "c34c16ef-82ef-40f0-89db-17c5f1b6f70c",
"riskScore": 0,
"signalScore": 0,
"scenarioScore": 0,
"tokenScore": 0,
"categoryScore": 0,
"ofacConfidentScore": 0,
"debtorProfileId": null,
"creditorProfileId": null
},
"error": null
}
//Response for Error – A9999
{
"id": "09c53a44-223f-4f57-bc8f-6a37d3df1b54",
"jsonrpc": "2.0",
"method": "ce.event",
"result": {
"resp": "event",
"status": "1"
},
"error": {
"code": "A9999",
"description": "Parsing Error"
}
}
//Response for Error – A1001, A1002, A1003, A1004, A1005, A1006, A1007, A1008
{
"id": "0b86948f-2139-4aaf-93e3-d0cd11c6bb32",
"jsonrpc": "2.0",
"method": "ce.event",
"result": null,
"error": {
"code": "A1008",
"description": "duplicate reference"
}
}